#pragma once

class Point3D;
class Direction3D;

class Vector3D
{
private:
	double x,y,z;
	
public:
	Vector3D();
	Vector3D(Vector3D &a);
	Vector3D(Point3D &a,Point3D &b);
	Vector3D(double x,double y,double z);
	~Vector3D();
	
	Vector3D& set(Vector3D &a);
	Vector3D& set(Point3D &a,Point3D &b);
	Vector3D& set(double x,double y,double z);
	Vector3D& setX(double x);
	Vector3D& setY(double y);
	Vector3D& setZ(double z);
	double getX();
	double getY();
	double getZ();
	bool eq(Vector3D &a);
	bool neq(Vector3D &a);
	double magnitude();
	Vector3D& direction(Direction3D &dir);
	
	//math
	Vector3D& add(Vector3D &a);
	Vector3D& add(Vector3D &a,Vector3D &b);
	Vector3D& sub(Vector3D &a);
	Vector3D& sub(Vector3D &a,Vector3D &b);
	Vector3D& multiply(double a);
	Vector3D& divide(double a);
	Vector3D& dot(Vector3D &a);
	Vector3D& dot(Vector3D &a,Vector3D &b);
	Vector3D& cross(Vector3D &a);
	Vector3D& cross(Vector3D &a,Vector3D &b);
	
	//operator overloads
	Vector3D& operator+=(Vector3D &a);
	Vector3D& operator-=(Vector3D &a);
	Vector3D& operator*=(Vector3D &dotV);
	Vector3D& operator*=(double magnitude);
	Vector3D& operator/=(Vector3D &crossV);
	Vector3D& operator/=(double magnitude);
	bool operator==(Vector3D &a);
	bool operator!=(Vector3D &a);
};
